Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples: set the home directory using homedir, not home #5101

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

ogayot
Copy link
Member

@ogayot ogayot commented Mar 26, 2024

Proposed Commit Message

examples: set the home directory using homedir, not home

According to the JSON schema, the "homedir" directive should be used to
set a user's home directory. However, we use "home" in a documented
example. Supplying the example cloud-config to cloud-init schema fails
with:

  Additional properties are not allowed ('home' was unexpected),

Fixed by replacing "home" with "homedir" in the example.


LP: #2047796

Test Steps

Place the following content in a filed called e.g., test.yaml

#cloud-config
users:
  - name: ubuntu
    plain_text_passwd: ubuntu,
    home: /home/ubuntu
    shell: /bin/bash
    lock_passwd: false
    gecos: Ubuntu all-oem-init
    groups:
    - adm
    - cdrom
    - dip
    - lxd
    - sudo
cloud-init schema --config-file test.yaml

Checklist

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

ogayot added 2 commits March 26, 2024 14:26
According to the JSON schema, the "homedir" directive should be used to
set a user's home directory. However, we use "home" in a documented
example. Supplying the example cloud-config to cloud-init schema fails
with:

  Additional properties are not allowed ('home' was unexpected),

Fixed by replacing "home" with "homedir" in the example.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TheRealFalcon TheRealFalcon merged commit 0aa17cd into canonical:main Mar 26, 2024
29 checks passed
@ogayot ogayot deleted the examples-s-home-homedir branch March 26, 2024 14:00
holmanb pushed a commit that referenced this pull request Apr 3, 2024
According to the JSON schema, the "homedir" directive should be used to
set a user's home directory. However, we use "home" in a documented
example. Supplying the example cloud-config to cloud-init schema fails
with:
  Additional properties are not allowed ('home' was unexpected),

Fixed by replacing "home" with "homedir" in the example.

LP: #2047796
holmanb pushed a commit that referenced this pull request Apr 3, 2024
According to the JSON schema, the "homedir" directive should be used to
set a user's home directory. However, we use "home" in a documented
example. Supplying the example cloud-config to cloud-init schema fails
with:
  Additional properties are not allowed ('home' was unexpected),

Fixed by replacing "home" with "homedir" in the example.

LP: #2047796
holmanb pushed a commit that referenced this pull request Apr 3, 2024
According to the JSON schema, the "homedir" directive should be used to
set a user's home directory. However, we use "home" in a documented
example. Supplying the example cloud-config to cloud-init schema fails
with:
  Additional properties are not allowed ('home' was unexpected),

Fixed by replacing "home" with "homedir" in the example.

LP: #2047796
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants